<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Update Data Example</title>
    <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
</head>

<body>
    <div class="container">
        <button>Get Data</button>
        <button>POST Data</button>
        <button>PUT Data</button>
        <button>DELETE Data</button>
        <script>
            const btn = document.querySelectorAll("button")

            btn[0].onclick = function () {
                axios.request({
                    method: 'GET',
                    url: 'http://150.158.14.110:8080/public/website/list'
                }).then(res => {
                    console.log(res);
                })
            }

            btn[1].onclick = function () {
                axios.post(
                    'http://150.158.14.110:8080/public/website/list',
                    {
                        name: 'John'
                    }).then(res => {
                        console.log(res);
                    })
            }
        </script>
</body>

</html>